package action.credit;

import java.util.List;

import service.credit.AppLoantypeService;
import service.dropdown.DropDownService;
import service.user.FindAllUserService;
import vo.EnterpriseInforBean;
import model.app.AppLoantype;
import model.personal.Personalbasic;
import model.security.UsrUser;
import core.action.BaseAction;
import exception.Exceptions;

public class CreditApplyAction extends BaseAction{
	
	//private TCredit credit = new TCredit();
	private List<UsrUser> userList;
	
	/*贷款类型列表*/
	private List<AppLoantype> loantypeList;
	
	private FindAllUserService findAllUserService;
	private AppLoantypeService appLoantypeService;
	
	
	private List<?> dcommonList;
	private List<?> culturaList;
	private DropDownService dropDownService;
	
	private EnterpriseInforBean enterpriseInforBean;
	private Personalbasic person;
	
	public String execute() throws Exception{
		//this.creditApplyService.insertintoT_credit(credit);
		//MessageJump("贷款信息增加成功","creditApplyInsert");
		return "message";
	}
	
	public String go_in_enterprise(){
		this.enterpriseInforBean = new EnterpriseInforBean();
		this.loantypeList = this.appLoantypeService.getLoanTypeList();
		this.userList = this.findAllUserService.findAll();
		return "senterp";
	}
	
	public String go_in_personal() throws Exceptions{
		this.person = new Personalbasic();
		this.culturaList = this.dropDownService.getCommonList(6, 0);
		this.dcommonList = this.dropDownService.getListBean(2, 0);
		this.loantypeList = this.appLoantypeService.getLoanTypeList();
		this.userList = this.findAllUserService.findAll();
		return "spersonal";
	}

	public List<UsrUser> getUserList() {
		return userList;
	}

	public void setUserList(List<UsrUser> userList) {
		this.userList = userList;
	}

	public FindAllUserService getFindAllUserService() {
		return findAllUserService;
	}

	public void setFindAllUserService(FindAllUserService findAllUserService) {
		this.findAllUserService = findAllUserService;
	}

	public List<AppLoantype> getLoantypeList() {
		return loantypeList;
	}

	public void setLoantypeList(List<AppLoantype> loantypeList) {
		this.loantypeList = loantypeList;
	}

	public AppLoantypeService getAppLoantypeService() {
		return appLoantypeService;
	}

	public void setAppLoantypeService(AppLoantypeService appLoantypeService) {
		this.appLoantypeService = appLoantypeService;
	}

	public List<?> getDcommonList() {
		return dcommonList;
	}

	public void setDcommonList(List<?> dcommonList) {
		this.dcommonList = dcommonList;
	}

	public DropDownService getDropDownService() {
		return dropDownService;
	}

	public void setDropDownService(DropDownService dropDownService) {
		this.dropDownService = dropDownService;
	}

	public List<?> getCulturaList() {
		return culturaList;
	}

	public void setCulturaList(List<?> culturaList) {
		this.culturaList = culturaList;
	}

	public EnterpriseInforBean getEnterpriseInforBean() {
		return enterpriseInforBean;
	}

	public void setEnterpriseInforBean(EnterpriseInforBean enterpriseInforBean) {
		this.enterpriseInforBean = enterpriseInforBean;
	}

	public Personalbasic getPerson() {
		return person;
	}

	public void setPerson(Personalbasic person) {
		this.person = person;
	}
}
